home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / Developer Essentials May91 / MPW Interfaces & Libraries 3.2 / AIncludes / StandardFile.a < prev    next >
Encoding:
Text File  |  1991-04-17  |  4.6 KB  |  182 lines  |  [TEXT/MPS ]

  1. ; Version: 1.4
  2. ; Created: Friday, January 20, 1990 at 9:11:52 PM
  3. ; File: StandardFile.a
  4. ;
  5. ; Assembler Interface to the Macintosh Libraries
  6. ; Copyright Apple Computer, Inc. 1989
  7. ; All Rights Reserved
  8. ;
  9. ;--------------------------------------------------------------------
  10.  
  11.     IF &TYPE('__IncludingStandardFile__') = 'UNDEFINED' THEN
  12. __IncludingStandardFile__    SET    1
  13.  
  14.  
  15.  
  16. StandardFileReply    RECORD    0
  17. sfGood                    DS.B    1                    ; ST if OK hit
  18. sfReplacing                DS.B     1                      ; ST if user requested "replace existing"
  19. sfType                     DS.L    1                     ; type of file
  20. sfFile                    DS.B    70                    ; FSSpec (vRefNum, parID, name)
  21. sfScript                DS.W    1                    ; ScriptCode of filename
  22. sfFlags                    DS.W    1                    ; Finder flags
  23. sfIsFolder                 DS.B    1                    ; ST if item is a folder
  24. sfIsVolume                 DS.B    1                    ; ST if item is a volume
  25. sfReserved1                 DS.L    1                    ; reserved set to 0
  26. sfReserved2                 DS.W    1                    ; reserved set to 0 
  27.                     ENDR
  28.  
  29.  
  30. SFReply        RECORD    0
  31. good            DS.B    1    ; ST if OK hit
  32. copy            DS.B    1    ; ST replacing ???
  33. fType             DS.L    1     ; type of file or DirID
  34. vRefNum            DS.W    1    ; vRefNum or WDRefNum
  35. version            DS.W    1    ; unused
  36. fName            DS.B    64    ; name of file
  37.             ENDR
  38.  
  39. ; pseudo-item hits for use in DlgHook
  40. sfHookFirstCall        EQU         -1
  41. sfHookCharOffset    EQU         $1000
  42. sfHookNullEvent        EQU         100
  43. sfHookRebuildList    EQU         101
  44. sfHookFolderPopUp    EQU         102
  45. sfHookOpenFolder    EQU         103
  46. ; the following are only in system 7.0+ 
  47. sfHookOpenAlias            EQU     104
  48. sfHookGoToDesktop        EQU     105
  49. sfHookGoToAliasTarget    EQU     106
  50. sfHookGoToParent        EQU        107
  51. sfHookGoToNextDrive        EQU        108
  52. sfHookGoToPrevDrive        EQU        109
  53. sfHookChangeSelection    EQU        110
  54. sfHookSetActiveOffset    EQU     200
  55. sfHookLastCall            EQU     -2
  56.  
  57.  
  58. ; resource IDs and item offsets of pre-system 7.0 dialogs 
  59. putDlgID          EQU         -3999                     ; SFPutFile dialog template ID
  60. putSave           EQU         1                         ; save button
  61. putCancel         EQU         2                         ; cancel button
  62. putPrompt        EQU            3                        ; prompt, i.e. Save document as:
  63. putVolume        EQU            4                        ; volume icon and name
  64. putEject          EQU         5                         ; eject button
  65. putDrive          EQU         6                         ; drive button
  66. putName           EQU         7                         ; editTExt item for file name
  67. putNmList         EQU         8                         ; userItem for file name list
  68.  
  69.  
  70. getDlgID          EQU         -4000                     ; SFGetFile dialog template ID
  71. getOpen           EQU         1                         ; open button
  72. getCancel         EQU         3                         ; cancel button
  73. getEject          EQU         5                         ; eject button
  74. getDrive          EQU         6                         ; drive button
  75. getNmList         EQU         7                         ; userItem for file name list
  76. getScroll         EQU         8                         ; userItem for scroll bar
  77. getGrayBar        EQU            9                        ; grey line between buttons
  78.  
  79.  
  80. ; resource IDs and item offsets of system 7.0+ dialogs 
  81. sfPutDialogID            EQU -6043;
  82. sfGetDialogID            EQU -6042; 
  83. sfItemOpenButton        EQU    1
  84. sfItemCancelButton        EQU    2
  85. sfItemBalloonHelp        EQU 3
  86. sfItemVolumeUser        EQU 4
  87. sfItemEjectButton        EQU 5
  88. sfItemDesktopButton        EQU 6
  89. sfItemFileListUser        EQU 7
  90. sfItemPopUpMenuUser        EQU 8
  91. sfItemDividerLinePict    EQU    9
  92. sfItemFileNameTextEdit    EQU    10
  93. sfItemPromptStaticText    EQU 11
  94. sfItemNewFolderUser        EQU 12
  95.  
  96.  
  97. ; the refcon field of the dialog record during a modalfilter or dialoghook contains one the following
  98. sfMainDialogRefCon        EQU        'stdf'
  99. sfNewFolderDialogRefCon    EQU        'nfdr'
  100. sfReplaceDialogRefCon    EQU        'rplc'
  101. sfStatWarnDialogRefCon    EQU        'stat'
  102. sfLockWarnDialogRefCon    EQU        'lock'
  103. sfErrorDialogRefCon        EQU        'err '
  104.  
  105.  
  106. ; Routine selectors
  107. selectorSFPutFile         EQU         1
  108. selectorSFGetFile         EQU         2
  109. selectorSFPPutFile        EQU         3
  110. selectorSFPGetFile        EQU         4
  111. selectorStandardPutFile    EQU            5
  112. selectorStandareGetFile    EQU            6
  113. selectorCustomPutFile    EQU            7
  114. selectorCustomGetFile    EQU            8
  115.  
  116.  
  117.  
  118.                   MACRO
  119.                   _SFPutFile
  120.                   MOVE.W     #selectorSFPutFile,-(SP)
  121.                 _Pack3
  122.                   ENDM
  123.  
  124.                   MACRO
  125.                   _SFGetFile
  126.                   MOVE.W     #selectorSFGetFile,-(SP)
  127.                 _Pack3
  128.                   ENDM
  129.  
  130.                   MACRO
  131.                   _SFPPutFile
  132.                   MOVE.W     #selectorSFPPutFile,-(SP)
  133.                 _Pack3
  134.                   ENDM
  135.  
  136.                   MACRO
  137.                   _SFPGetFile
  138.                   MOVE.W     #selectorSFPGetFile,-(SP)
  139.                 _Pack3
  140.                   ENDM
  141.                 
  142.                  MACRO
  143.                   _StandardPutFile
  144.                   MOVE.W     #selectorStandardPutFile,-(SP)
  145.                 _Pack3
  146.                   ENDM
  147.  
  148.                   MACRO
  149.                   _StandardGetFile
  150.                   MOVE.W     #selectorStandareGetFile,-(SP)
  151.                 _Pack3
  152.                   ENDM
  153.  
  154.                    MACRO
  155.                   _CustomPutFile
  156.                   MOVE.W     #selectorCustomPutFile,-(SP)
  157.                 _Pack3
  158.                   ENDM
  159.  
  160.                  MACRO
  161.                   _CustomGetFile
  162.                   MOVE.W     #selectorCustomGetFile,-(SP)
  163.                 _Pack3
  164.                   ENDM
  165.  
  166.  
  167. ; old style equates for compatability
  168.  
  169. ; Reply record data structure
  170. rGood             EQU         0                         ; ignore command if FALSE
  171. rType             EQU         2                         ; file type
  172. rVolume           EQU         6                         ; volume reference number
  173. rVersion          EQU         8                         ; file's version number
  174. rName             EQU         10                        ; file name
  175.  
  176. ; Routine selectors
  177. sfPutFile         EQU         1
  178. sfPPutFile        EQU         3
  179. sfGetFile         EQU         2
  180. sfPGetFile        EQU         4
  181.  
  182.     ENDIF    ; ...already included